Method for progressive lossless video coding, method for progressive lossless video decoding, progressive lossless video coding apparatus, progressive lossless video decoding apparatus, progressive lossless video coding program, progressive lossless video decoding program, and recording media of progressive lossless video coding program and progressive lossless video decoding program

ABSTRACT

Highly efficient lossless decoding is realized under the condition that codes transmitted as a base part are compatible with the H.264 standard. An orthogonal transformation section ( 12 ) performs orthogonal transformation of residual signals (Rorig), acquires transform coefficients (Xorig), and a quantization section ( 13 ) quantizes the transform coefficients. An existential space determination section ( 14 ) obtains information on upper limits and lower limits of the respective coefficients (an existential space of transform coefficients) from quantization information. A bundled coefficients coding section ( 16 ) decides whether respective grid points in the existential space of the transform coefficients have validity as results of orthogonal transformation of the residual signals, and enumerates valid grid points, assigns serial numbers (index) in the order of enumeration, and encodes using a serial number coding section ( 166 ) the serial numbers of grid points which match the transform coefficients (Xorig) of the residual signal.

TECHNICAL FIELD

The present invention relates to highly efficient video coding/decodingtechnology. More specifically, it relates to progressive lossless videocoding/decoding technology that enables lossless decoding matching theoriginal signal, while maintaining compatibility of code transmitted asthe base part with the H.264 standard and restricting the coding amountof the additional part to a minimum.

Priority is claimed on Japanese Patent Application No. 2004-286412,filed on Sep. 30, 2004, the content of which is incorporated herein byreference.

BACKGROUND ART

Conventional lossless or progressive video coding schemes include theschemes mentioned below. The lossless mode of Motion JPEG 2000 standard(see non-patent reference 1) and JPEG-LS (see non-patent reference 2)perform closed intra-frame coding since they are based on still images.

The “Fidelity Range Extension (FRExt),” the second version of the H.264standard (see non-patent reference 3) transmits the intra-frame and theinter-frame prediction residual signals as-is (without orthogonaltransformation and quantization).

Progressive coding schemes combined with lossy coding schemes includeschemes that code differences between decoded images and original images(refer to non-patent reference 4). Such schemes use MPEG-2 in the basicinformation, which can be used even by other schemes.

Moreover, there are schemes that apply Discrete Cosine Transforms (DCT)for transformation of coefficients to integers, expand and successivelytransmit the transformed integers to bit planes, as in the FineGranularity Scalable (FGS) Profile scheme in the MPEG-4 standard (seenon-patent reference 5).

[Non-Patent Reference 1]

-   ISO/IEC 15444-3: 2002 Information technology—JPEG 2000 image coding    system—Part 3: Motion JPEG 2000    [Non-Patent Reference 2]-   ISO/IEC 14495-1: 1999 Information technology—Lossless and    near-lossless coding of continuous tone still images    [Non-Patent Reference 3]-   ISO/IEC 14496-10: 2003 Information technology—Coding of audio-visual    objects—Part 10: Advanced Video Coding    [Non-Patent Reference 4]-   Nakajima, Yashima, Kobayashi: “Study on hierarchical lossless coding    based on MPEG-2 coding parameters,” The Institute of Electronics,    Information, and Communication Engineers General Conference,    D-11-49, March 2000.    [Non-Patent Reference 5]-   ISO/IEC 14496-2: 2003 Information technology—Coding of audio-visual    objects—Part 2: Visual

DISCLOSURE OF INVENTION Problem to be Solved by the Invention

The JPEG2000 (see non-patent reference 1) above can transmitprogressively but it cannot perform highly efficient coding usingvideo-specific inter-frame correlation because it performs intra-framecoding. Also, the above-mentioned JPEG-LS (see non-patent reference 2)has a higher efficiency compared to JPEG2000, but it is limited in itsefficiency since it performs closed intra-frame coding, and it cannottransmit progressively.

“Fidelity Range Extension (FRExt),” the second version of the H.264standard (non-patent reference 3) has the problem that it cannottransmit progressively.

The technology mentioned in the non-patent reference 4 is meant forcoding the residual in the original signal space and not for coding theresidual in the orthogonal transformation space. Therefore, it haslimitations in compression efficiency since coding has to be performedconsidering even the spaces in which the primarily original signals donot exist.

The Fine Granularity Scalable (FGS) Profile scheme of MPEG-4 standard(see non-patent reference 5) had the problems mentioned below.

After DCT, which is real number transformation, the coefficients aretransformed to integers; therefore, lossless coding is not possibleregardless of the amount of additional information used;

If it is used as-is in H.264 standard schemes in which the coefficientsafter transformation are expanded as in equation (6) described later,the expanded part is added as-is to the wasted coding amount.

In this way, the scheme in which video-coding efficiency was enhanced byperforming inter-frame predictions, scalability existed, and basicinformation was compatible with the H.264 standard, had not beenproposed.

In the light of the problems mentioned above, the present invention hasas its object, to enable lossless decoding while restricting the codingamount of the additional part to a minimum and maintaining compatibilitywith the H.264 standard of the code transmitted as the base part.

Means for Solving the Problems

To resolve the problems mentioned above, the progressive lossless videocoding method according to the first aspect of the present invention isa progressive lossless video coding method that performs video codingwhich allows decoding that matches an original signal comprising: a stepthat inputs a residual signal obtained by subtracting a predictionsignal from an original signal for each block of an image signal, theprediction signal conforming to a predetermined lossy video codingscheme and being obtained by space prediction in intra-frame coding orby time prediction in inter-frame coding; a step that determinestransform coefficients obtained by applying orthogonal transformation onthe residual signal and quantization coefficients obtained by quantizingthe transform coefficients based on the lossy video coding scheme; astep that identifies existential space of transformed coefficientsestablished from the quantization coefficients, and quantizationparameters and quantization methods used during quantization; a validityjudging step that judges whether grid points in the existential space ofthe transform coefficients are valid as a result of orthogonaltransformation of the residual signal; an enumerating step thatsearches, in a predetermined grid point order, grid points for which thejudgment is valid from the grid points in the existential space of thetransform coefficients, and enumerates the grid points thus searched; astep that assigns serial numbers in the order of enumeration toenumerated grid points; a step that acquires serial numbers of gridpoints matching the transform coefficients of the residual signal fromthe enumerated grid points, and a step that codes and outputs the serialnumbers of the grid points matching the transform coefficients of theresidual signal.

According to the second aspect of the present invention, in theprogressive lossless video coding method, in the enumerating step thatenumerates the grid points for which the judgment is valid from the gridpoints in the existential space of the transform coefficients,processing of judgment on whether the grid points are valid as theresult of the orthogonal transformation of the residual signal isomitted for grid points at which transform coefficients cannot take inthe space by using an integer value relationship between the transformcoefficients.

According to the third aspect of the present invention, the progressivelossless video coding method further comprises a step that outputsinformation excluding values for which some specific transformcoefficients cannot take by using an integer value relationship betweenthe specific transform coefficients and coefficients which have beenalready output, instead of outputting the specific transformcoefficients, wherein, in the enumerating step that enumerates gridpoints for which the judgment is valid from the grid points in theexistential space of the transform coefficients, the grid points areenumerated in existential space having a reduced dimension using thetransform coefficients output beforehand.

According to the fourth aspect of the present invention, in theprogressive lossless video coding method, the validity judging stepjudges validity using only bit operations, integer addition, and integersubtraction.

According to the fifth aspect of the present invention, in theprogressive lossless video coding method, by using the knowledge that anintersection between an existential range of the residual signal and anexistential range of the transform coefficients becomes a convexpolyhedron, the validity judgment is suspended halfway when the gridpoints to be judged exist outside the convex polyhedron.

According to the sixth aspect of the present invention, the progressivelossless video coding method further comprises a step that estimates acoding amount without executing the enumerating step that enumerates thegrid points for which the judgment is valid from the grid points in theexistential space of the transform coefficients.

The seventh aspect of the present invention is a decoding method fordecoding coded streams coded by the progressive lossless video codingmethod, comprises: a step that executes a decoding scheme correspondingto the predetermined lossy video coding scheme; a step that identifiesexistential space of transform coefficients established fromquantization parameters, quantization coefficients, quantization methodson a coding side, and, if any, already decoded coefficients; a step thatdecodes coefficients that need to be decoded; a validity judging stepthat judges whether a grid point in the existential space of thetransform coefficients is valid as a result of orthogonal transformationof the residual signal; an enumerating step that searches grid pointsfrom the grid points in the existential space of the transformcoefficients for which the judgment is valid in the same order as theorder of search of the grid points during coding; a step that decodesserial numbers; and a step that outputs grid points having orders thatare equal to the decoded serial numbers from enumerated grid points.

A progressive lossless video coding apparatus according to the eighthaspect of the present invention is a lossless video coding apparatusthat performs video coding which allows decoding that matches anoriginal signal, comprising: a means that inputs a residual signalobtained by subtracting a prediction signal from an original signal foreach block of an image signal, the prediction signal conforming to apredetermined lossy video coding scheme and being obtained by spaceprediction in intra-frame coding or by time prediction in inter-framecoding; a means that determines transform coefficients obtained byapplying orthogonal transformation on the residual signal andquantization coefficients obtained by quantizing the transformcoefficients based on the lossy video coding scheme; an existentialspace deciding means that identifies existential space of transformedcoefficients established from the quantization coefficients, andquantization parameters and quantization methods used duringquantization; a validity judging means that judges whether grid pointsin the existential space of the transform coefficients are valid as aresult of the orthogonal transformation of the residual signal; anenumerating means that searches, in a predetermined grid point order,grid points for which the judgment is valid from the grid points in theexistential space of the transform coefficients, and enumerates the gridpoints thus searched; a means that assigns serial numbers in the orderof enumeration to enumerated grid points; a means that acquires serialnumbers of grid points matching the transform coefficients of theresidual signal from enumerated grid points, and a means that codes andoutputs the serial numbers of the grid points matching the transformcoefficients of the residual signal.

The ninth aspect of the present invention is a lossless video decodingapparatus that decodes coded streams coded by the progressive losslessvideo coding apparatus, comprising: a means that executes a decodingscheme corresponding to the predetermined lossy video coding scheme; anexistential space determining means that identifies existential space oftransform coefficients established from quantization parameters,quantization coefficients, quantization methods on a coding side, and,if any, already decoded coefficients; a coefficient decoding means thatdecodes coefficients that need to be decoded; a validity judging meansthat judges whether a grid point in the existential space of thetransform coefficients is valid as a result of orthogonal transformationof the residual signal; an enumerating means that searches grid pointsfrom the grid points in the existential space of the transformcoefficients for which the judgment is valid in the same order as theorder of search of grid points during coding; a serial number decodingmeans that decodes serial numbers; and an output means that outputs gridpoints having orders that are equal to the decoded serial numbers fromenumerated grid points.

The progressive lossless video coding and decoding processes mentionedabove can be realized by computer and software programs. These programscan be recorded and offered in recording media readable by computers,and they can also be offered through a network.

That is, the tenth aspect of the present invention is a progressivelossless video coding program for executing the progressive losslessvideo coding method of the present invention on the computer.

The eleventh aspect of the present invention is a progressive losslessvideo decoding program for executing the progressive lossless videodecoding method of the present invention on the computer.

The twelfth aspect of the present invention is a recording medium for aprogressive lossless video coding program wherein a program forexecuting on a computer the progressive lossless video coding method ofthe present invention is recorded on a recording medium that can be readby the computer.

The thirteenth aspect of the present invention is a recording medium fora progressive lossless video decoding program wherein a program forexecuting on a computer the progressive lossless video decoding methodof the present invention is recorded on a recording medium that can beread by the computer.

Effect of the Invention

According to the present invention, lossless decoding that matches theoriginal signals can be performed while maintaining compatibility withthe coding in the H.264 standard for codes transmitted as base part, andrestricting the coding amount of the additional part to a minimum.

Moreover, according to the present invention, the above processing canbe speeded up by several trillions of times. Furthermore, the codingamount can be estimated without actually performing coding. As a result,the selection of prediction mode for reducing the coding amount can bespeeded up.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 shows the existential range Ω and Ψ of R and X respectively.

FIG. 2 is the enlarged view of the Ψ area.

FIG. 3 shows an example of the configuration of a progressive losslessvideo coding apparatus.

FIG. 4 shows an example of the configuration of a progressive losslessvideo decoding apparatus.

FIG. 5 shows an example of the configuration of a progressive losslessvideo decoding apparatus when universal variable length code is used forcoding the index.

FIG. 6 shows the process flow of Example 1.

FIG. 7 shows the process flow of Example 2.

EXPLANATION OF REFERENCE NUMERALS

-   1 Progressive lossless video coding apparatus-   2, 3 Progressive lossless video decoding apparatus-   11 Initialization section-   12 Orthogonal transformation section-   13 Quantization section-   14 Existential space determination section-   15 Successive coefficients coding section-   16 Bundled coefficients coding section-   17 End judging section-   21 Initialization decoding section-   22 Existential space determination section-   23 Successive coefficients decoding section-   24, 28 Bundled coefficients decoding section-   25 Ubuf [ ]-   26 End judging section-   27 Universal variable length decoding section-   161, 241, 281 Multiple loop starting section-   162, 242, 282 Inverse orthogonal transformation section-   163, 243, 283 Prediction signal adding section-   164, 244, 284 Internal variable updating section-   165, 245, 285 Multiple loop end judging section-   166 Serial number coding section-   246 Serial number decoding section-   247, 286 Original signal output section

BEST MODE FOR CARRYING OUT THE INVENTION

Embodiments and the Examples for carrying out the present invention aredescribed here referring to the drawings. Note, however, that thepresent invention is not limited to the Embodiments and the Examplesdescribed hereunder; for instance, a suitable combination of these mayalso be included in the scope of the present invention.

The orthogonal transformation of the H.264 scheme is describedhereunder, on the premise of the explanation of the present invention.

Orthogonal Transformation of the H.264 Scheme

In the H.264 standard, after predicting the pixel values within theframe or between frames, orthogonal transformation of the residual andquantization of coefficients are performed for every small block of 4vertical and horizontal pixels.

The small block of original signals is expressed as a 4×4 matrix U, andthe signals predicting the block in the frame or between frames aresimilar expressed by a 4×4 matrix Y. Thus, the prediction residualsignal (4×4 matrix R) is taken as:R=U−Y  (1)

All elements of these matrices are integers. Here, each element of theresidual signal is expressed as below.

$\begin{matrix}{R = \begin{bmatrix}a & b & c & d \\e & f & g & h \\i & j & k & l \\m & n & o & p\end{bmatrix}} & (2)\end{matrix}$

Orthogonal transformation is applied to this matrix as below.X=TRT ^(t)  (3)Where,

$\begin{matrix}{T = \begin{bmatrix}1 & 1 & 1 & 1 \\2 & 1 & {- 1} & {- 2} \\1 & {- 1} & {- 1} & 1 \\1 & {- 2} & 2 & {- 1}\end{bmatrix}} & (4)\end{matrix}$

T^(t) expresses the transpose of the matrix T.

Moreover, each element of X is as below.

$\begin{matrix}{X = \begin{bmatrix}A & B & C & D \\E & F & G & H \\I & J & K & L \\M & N & O & P\end{bmatrix}} & (5)\end{matrix}$

Note that although T is an orthogonal transformation, it is not anorthonormal transformation. The determinant of orthonormaltransformation is always 1, but the determinant of T (detT) is 40. Thus,the volume of an arbitrary 16-dimensional area becomes 40 times aftermapping by T. In equation (3), transformation is applied by T to 4 rowsand 4 columns of R. Thus, the coefficient X after transformation isextended and mapped to an extremely sparse space compared to the statebefore the transformation (residual signal R), as below.40⁴⁺⁴=6,553,600,000,000 times  (6)

The orthogonal transform coefficient in the H.264 is an integer, butmost of the grid points of the coefficient space are unsuitable asresidual signals (that is, integral values are not obtained even afterinverse transformation by equation (8) given later). Assuming that allgrid points of the coefficient space are to be used, and the grid pointscorresponding to the original signals are coded, excess bits calculatedby dividing the logarithm of the number to the base 2 by the number ofpixels (4*4=16) will be needed per pixel.log₂(40⁴⁺⁴)/16=2.66[bit]  (7)

Considering that the target signal is 8 bits (per color component), theincrease of 2.66 bits must hinder the practical use noticeably.

In the H.264 scheme, each element of X that has been expandedconsiderably as mentioned above is roughly (in a comparatively largewidth) quantized, and the expanded part is compensated.

If no quantization is performed, the residual signals are completelyrestored by the following inverse transformationR=T ⁻¹ X(T ⁴)⁻¹  (8)

The 4×4 matrix U of original pixel values can be restored by thefollowing equation.U=R+Y  (9)

However, in practice, when the quantized coefficients in the H.264coding are subjected to inverse quantization on the decoding side,values close to the original values, but not exactly the same as theoriginal values are reproduced. In this way, after the transmission ofX, a different value X′ (not equal to X) is obtained, and when it issubjected to inverse transformation by equation (8), becomes:R≠R′=T ⁻¹ X′(T ^(t))⁻¹

On the decoding side, Y can have the same value as on the coding side,but since R cannot be reproduced, the original pixel value U=R+Y alsocannot be reproduced.

Accordingly, to completely reproduce U, additional information thatcompensates the information lost in the quantization of X must beseparately transmitted.

Embodiment 1

The present Embodiment corresponds to the first aspect of the presentinvention.

The method for progressive lossless video coding according to Embodiment1 encodes the information lost in this quantization efficiently, asdescribed below.

For instance, the value of coefficient A in equation (5) is subjected toquantization and transmitted, therefore, the correct value of A beforequantization is not known on the decoding side. Here, the quantizationmethod on the coding side is known, therefore, the range that A can takeis known. That is, taking the example of the quantization method ofH.264 software JM (reference: http://bs.hhi.de/˜suehring/tml/, “JMReference Software Version 8.4”, July 2004), the quantized valuelevel_(A) can be found, as below.|level_(A)|=(|A|*qc _(A) +qpconst)>>qbits  (10)

Here, “>>” is the right bit shift operator. The positive/negative signof level_(A) matches the positive/negative sign of A. Here, qc_(A) is aninteger determined by JM corresponding to the position of A and thequantization parameters; qpconst is an integer determined by JMcorresponding to the coding mode and the quantization parameters, andqbits is an integer determined by JM corresponding to the quantizationparameters.

On the decoding side, the quantization parameters, the coding mode, andthe quantization method can be known; therefore, level_(A), qpconst, andqbits common to those on the coding side can be acquired. First, thefollowing are determined from the value of level_(A).x=|level_(A) |<<qbitsy=x+(1<<qbits)−1mmin=(x−qpconst+qc _(A)−1)/qc _(A)mmax=(y−qpconst)/qc _(A)

Here, “<<” is the left bit shift operator, “/” is an integer divisionfor rounding numbers down after the decimal point. The upper and lowerlimits A_(min) and A_(max) are determined as given below.

$\begin{matrix}{A_{\min} = \left\{ \begin{matrix}{{- m}\;\max} & \left( {{{if}\mspace{14mu}{level}_{A}} < 0} \right) \\{{- m}\;\max} & \left( {{{if}\mspace{14mu}{level}_{A}} = 0} \right) \\{m\;\min} & \left( {{{if}\mspace{14mu}{level}_{A}} > 0} \right)\end{matrix} \right.} & (11) \\{A_{\max} = \left\{ \begin{matrix}{{- m}\;\min} & \left( {{{if}\mspace{14mu}{level}_{A}} < 0} \right) \\{m\;\max} & \left( {{{if}\mspace{14mu}{level}_{A}} = 0} \right) \\{m\;\max} & \left( {{{if}\mspace{14mu}{level}_{A}} > 0} \right)\end{matrix} \right.} & (12)\end{matrix}$

In this way, the following upper and lower limits that the coefficientbefore quantization can take, can be obtained.Lower limits A _(min) ,B _(min) ,C _(min), . . . , and P _(min)  (13)Upper limits A _(max) ,B _(max) ,C _(min), . . . , and P _(max)  (14)

The ranges of these numerical values correspond to the “existentialspace of transform coefficients” of the first aspect of the presentinvention.

By executing the 16-nested loops (corresponding to the “enumeratingstep” of the first aspect of the present invention) as given inalgorithm 1 shown below based on the upper and lower limits, all validitems in the space after the orthogonal transformation can be enumeratedwithout omission. The process below corresponds to the “validityjudgment” of the first aspect of the present invention.

All elements of R are integers

All elements of U lie in the range of 8-bit integers [0-255]

As a result of the validity judgment mentioned above, the total numberof grid points enumerated can be assigned to cases, while the “serialnumbers” of grid points matching orthogonal transform coefficients ofthe residual signals can be assigned to index.

[Algorithm 1] 1. index

0 2. cases

0 3. for A

A_(min) to A_(max) 4. for B

B_(min) to B_(max) 5. for C

C_(min) to C_(max) 6. for D

D_(min) to D_(max) 7. for E

E_(min) to E_(max) 8. for F

F_(min) to F_(max) 9. for G

G_(min) to G_(max) 10. for H

H_(min) to H_(max) 11. for I

I_(min) to I_(max) 12. for J

J_(min) to J_(max) 13. for K

K_(min) to K_(max) 14. for L

L_(min) to L_(max) 15. for M

M_(min) to M_(max) 16. for N

N_(min) to N_(max) 17. for O

O_(min) to O_(max) 18. for P

P_(min) to P_(max) 19. begin 20. R

T⁻¹×(T^(t) )⁻¹ (* Equation (8) *) 21. if all elements of R are integers22.  then (* A to P are valid results of orthogonal transformation of    integer signals *) 23.   U

R+Y (* Equation (9) *) 24.    if all elements of U lie in the range of8-bit integers [0-255] 25.     then (* A to P are valid results oforthogonal           transformation of residual signals *) 26.      if Xmatches the original transform coefficient 27.       then index

cases 28.     endif 29.     cases

cases + 1 30.    endif 31. endif 32. end 33. index coded using theinformation amount corresponding to cases

Embodiment 2 Speed Up Using Integer Value Relationship Between TransformCoefficients

The present Embodiment corresponds to the second aspect of the presentinvention.

In the Embodiment 1, the total loop frequency is extremely large becauseof executing each of the 16-nested loops in one interval. In Embodiment2, however, the integer relationship existing between orthogonaltransform coefficients is used. Thus, the loop frequency can besignificantly reduced while the coding efficiency remains the same.

First, by re-arranging the elements of the 4×4 matrix R from the top rowto the bottom row sequentially, the 16-dimensional row vector ↑x can beobtained.↑x=[a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p]  (15)

Equation (3) can be re-written using this 16-dimensional vector, asshown below.A=↑t _(A) ↑x ^(t)B=↑t _(B) ↑x ^(t). . .P=↑t _(P) ↑x ^(t)

Where,↑t _(A)=[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,]↑t _(B)=[2,1,−1,−2,2,1,−1,−2,2,1,−1,−2,2,1,−1,−2]↑t _(C)=[1,−1,−1,1,1,−1,−1,1,1,−1,−1,1,1,−1,−1,]↑t _(D)=[1,−2,2,−1,1,−2,2,−1,1,−2,2,−1,1,−2,2,−1]↑t _(E)=[2,2,2,2,1,1,1,1,−1,−1,−1,−1,−2,−2,−2,−2]↑t _(F)=[4,2,−2,−4,2,1,−1,−2,−2,−1,1,2,−4,−2,2,4]↑t _(G)=[2,−2,−2,2,1,−1,−1,1,−1,1,1,−1,−2,2,2,−2]↑t _(H)=[2,−4,4,−2,1,−2,2,−1,−1,2,−2,1,−2,4,4,2]↑t _(I)=[1,1,1,1,−1,−1,−1,−1,−1,−1,−1,−1,1,1,1,1]↑t _(J)=[2,1,−1,−2,−2,−1,1,2,−2,−1,1,2,2,1,−1,−2]↑t _(K)=[1,−1,−1,1,−1,1,1,−1,−1,1,1,−1,1,−1,−1,1]↑t _(L)=[1,−2,2,−1,−1,2,−2,1,−1,2,−2,1,1,−2,2,−1]↑t _(M)=[1,1,1,1,−2,−2,−2,−2,2,2,2,2,−1,−1,−1,−1]↑t _(N)=[2,1,−1,−2,−4,−2,2,4,4,2,−2,−4,−2,−1,1,2]↑t _(O)=[1,−1,−1,1,−2,2,2,−2,2,−2,−2,2,−1,1,1,−1]↑t _(P)=[1,−2,2,−1,−2,4,−4,2,2,−4,4,−2,−1,2,−2,1]

Here, calculating ↑t_(A)+↑t_(C) gives:

$\begin{matrix}{{\left. \uparrow t_{A} \right. + \left. \uparrow t_{C} \right.} = \left\lbrack {2,0,0,2,2,0,0,2,2,0,0,2,2,0,0,2} \right\rbrack} \\{= {2\left\lbrack {1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1} \right\rbrack}}\end{matrix}$ ${Therefore},\begin{matrix}{{A + C} = \left. \left( {\left. \uparrow t_{A} \right. + \left. \uparrow t_{C} \right.} \right)\uparrow x^{t} \right.} \\{= \left. {2\left\lbrack {1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1} \right\rbrack}\uparrow x^{t} \right.}\end{matrix}$

Thus, A+C is always an even number for any arbitrary integer elementvector ↑x.

That is, if the value of A is known, the lower order first bit of C isseen to be the same as that of A, and the existential range of C is:C _(min)+((C _(min) +A)&1)≦C≦C _(max)−((C _(max) +A)&1)  (16)

Thus, C exists sparsely in this range in the interval 2. Here, ‘&’ isthe bit AND operator.

The same holds true for the following, which are in the same positionalrelationships:

-   -   E and G    -   I and K    -   M and O

In the vertical direction, similarly, A+I is even; therefore, if thevalue of A is known, the range of I existing in interval 2 can be known.The same holds true for the following, which are in the same positionalrelationships:

-   -   B and J    -   C and K    -   D and L

Next, B+(C>>1)+(A>>1) is always even for any arbitrary integer elementvector ↑x. This is verified by varying each element of ↑x through 0, 1,2, and 3 and confirming that it is even. That is, if the values of A andC are known, the lower order first bit of B is seen to be the same asthat of (C>>1)+(A>>1). Therefore, similar to the above, the existentialrange of B is known, in which B exists in interval 2. The same holdstrue for the following, which are in the same positional relationshipsand in the same positional relationships vertically.

-   -   F and (E>>1)+(G>>1)    -   J and (I>>1)+(K>>1)    -   N and (M>>1)+(O>>1)    -   E and (A>>1)+(I>>1)    -   F and (B>>1)+(J>>1)    -   G and (C>>1)+(K>>1)    -   H and (D>>1)+(L>>1)

Next,

2.5( ↑ t_(A) +  ↑ t_(C)) + 2 ↑ t_(B) +  ↑ t_(D) = [10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0, 10, 0, 0, 0] = 10[1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0]

Thus, 2B+D+2.5 (A+C) always becomes a multiple of 10 for any arbitraryinteger element vector ↑x.

That is, if the values of A, B and C are known, the sum of a residuemodulo 10 of D (D mod 10) and 2.5 (A+C)+2B becomes 0 or 10. Therefore,the existential range of D can be known, and D exists in this range inthe interval 10.

The same holds true for those which are in the same positionalrelationships and the same vertical positional relationships, forinstance, between M and A, E and I.

The operator mod y, which is the residue modulo of integer y used here,is the same as the remainder operator ‘%’ used in languages such as theC language for non-negative integer x≧0. That is, x mod y=x % y.

With respect to the negative integer x<0, the % operator becomes an oddfunction as shown below.x%y=−((−x)%y)

However, here, to ensure that the result does not become negative, mod yis taken as: x mod y=(x % y)+y (for x<0)

For instance, (−1) mod 10=9

Moreover,

 ↑ t_(A) +  ↑ t_(C) +  ↑ t_(I) +  ↑ t_(K) = [4, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 4] = 4[1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1]

Accordingly, A+C+I+K is always a multiple of 4 for any arbitrary integerelement vector ↑x.

That is, if the values of A, C, and I are known, the sum of the residuemodulo 4 of K and (A+C+I) becomes 0 or 4; therefore, the existentialrange of K can be known, and K exists in this range in interval 4.

Relationships such as given below also exist.

 ↑ t_(B) −  ↑ t_(J) +  ↑ t_(E) −  ↑ t_(G) = [0, 4, 4, 0, 4, 4, 0, −4, 4, 0, −4, −4, 0, −4, −4, 0] = 4[0, 1, 1, 0, 1, 1, 0, −1, 1, 0, −1, −1, 0, −1, −1, 0]2.5( ↑ t_(A) +  ↑ t_(C) +  ↑ t_(I) +  ↑ t_(K) + 2( ↑ t_(E) +  ↑ t_(G)) +  ↑ t_(M) +    ↑ t_(O) = [20, 0, 0, 20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] = 20[1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]2.5( ↑ t_(A) +  ↑ t_(C) +  ↑ t_(I) +  ↑ t_(K)) + 2( ↑ t_(B) +  ↑ t_(J)) +  ↑ t_(D) +  ↑ t_(L) = [20, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 20, 0, 0, 0] = 20[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0]6.25( ↑ t_(A) +  ↑ t_(C) +  ↑ t_(I) +  ↑ t_(K)) + 5( ↑ t_(B) +  ↑ t_(E) +  ↑ t_(G) +  ↑ t_(J)) + 2.5( ↑ t_(D) +  ↑ t_(L) +  ↑ t_(M) +  ↑ t_(O)) + 4 ↑ t_(F) + 2(t_(H) +  ↑ t_(N)) +    ↑ t_(P) = [100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] = 100[1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

That is, if multiple loops are executed as shown below, the total numberof loops can be reduced compared to looping each “for”-loop in 1interval as follows:1/(2*2*10*2*2*10*4*2*2*10*4*20*10*20*100)=1/409,600,000,0001) Range of A looped in 1 interval2) Range of C looped in 2 intervals (using A)3) Range of B looped in 2 intervals (using A and C)4) Range of D looped in 10 intervals (using A, B, and C)5) Range of I looped in 2 intervals (using A)6) Range of E looped in 2 intervals (using A and I)7) Range of M looped in 10 intervals (using A, I, and E)8) Range of K looped in 4 intervals (using A, C, and I)9) Range of G looped in 2 intervals (using E)10) Range of F looped in 2 intervals (using E and G)11) Range of H looped in 10 intervals (using E, F, and G)12) Range of J looped in 4 intervals (using B, E, and G)13) Range of L lopped in 20 intervals (using A, B, C, D, I, J, and K)14) Range of N looped in 10 intervals (using B, F, and J)15) Range of O looped in 20 intervals (using A, C, E, G, I, K, and M)16) Range of P looped in 100 intervals (using A to O)

More specifically, the procedure is as given in algorithm 2. Here,C′_(min), B′_(min) and D′_(min) are found by using:f(x,y)=(−x)mod y  (17)as given below.C′ _(min) =C _(min) +f(C _(min) +A,2)  (18)B′ _(min) =B _(min) +f(B _(min)+(A>>1)+(C>>1),2)  (19)D′ _(min) =D _(min) +f(D _(min)+2B+2.5(A+C),10)  (20)

E′_(min) to P′_(min) are also found in a similar manner.

[Algorithm 2] 1. index

0 2. cases

0 3. for A

A_(min) to A_(max) (* 1 interval only here *) 4. for C

C′_(min) to C_(max) step 2 5. for B

B′_(min) to B_(max) step 2 6. for D

D′_(min) to D_(max) step 10 7. for I

I′_(min) to I_(max) step 2 8. for E

E′_(min) to E_(max) step 2 9. for M

M′_(min) to M_(max) step 10 10. for K

K′_(min) to K_(max) step 4 11. for G

G′_(min) to G_(max) step 2 12. for F

F′_(min) to F_(max) step 2 13. for H

H′_(min) to H_(max) step 10 14. for J

J′_(min) to J_(max) step 4 15. for L

L′_(min) to L_(max) step 20 16. for N

N′_(min) to N_(max) step 10 17. for O

O′_(min) to O_(max) step 20 18. for P

P′_(min) to P_(max) step 100 19. begin 20. R

T⁻¹×(T^(t))⁻¹ (* Equation (8) *) 21. if all elements of R are integers22.  then (* A-P are valid results of orthogonal transformation     ofinteger signals *) 23.   U

R+Y (* Equation (9) *) 24.    if all elements of U lie in the range of8-bit integers [0-255] 25.     then (* A-P are valid results oforthogonal transformation          of residual signals*) 26.      if Xmatches the original transform coefficient 27.       then index

cases 28.      endif 29.      cases

cases + 1 30. endif 31. endif 32. end 33. index coded using aninformation amount corresponding to cases

Embodiment 3 Reduction in the Multiplicity of Loops

The present Embodiment corresponds to the third aspect of the presentinvention.

The algorithm of the Embodiment 1 and the algorithm of the Embodiment 2use the 16-nested loop. In the Embodiment 3, the multiplicity of loopsis reduced in order to achieve higher processing. Specifically, byseparately transmitting the 8 coefficients below from the 16 A to Pcoefficients, the loops corresponding to these coefficients areeliminated.

A B C D

E ▪ ▪ ▪

I ▪ K ▪

M ▪ ▪ ▪

First, let us consider the transmission of coefficient A. For instance,if the following:Z _(A) =A−A _(min)is transmitted as “additional information,” then by taking:A=Z _(A) +A _(min)on the decoding side, A can be restored.

Since the total number of values that A can take is A_(max)−A_(min)+1,an information amount required for coding Z_(A) becomes:log₂(A _(max) −A _(min)+1)[bit]  (21)

Since this can be shared with the decoding side, Z_(A) can be decoded.

The coefficients B to P can be transmitted in a similar manner as A, butthe residual signal is distributed very sparsely in the space afterorthogonal transformation, therefore, the encoded amount is wastedconsiderably. For instance, since loops associated with B are in twointervals when A and C are already known, if Z_(B)=(B−B′_(min))/2 istransmitted, B can be restored on the decoding side byB=2Z_(B)+B′_(min). The information amount required for coding Z_(B)becomes log₂ ((B_(max)−B′_(min))/2+1)[bit].

The same holds true for C to K. Accordingly, by executing the proceduresbelow:

1) Coding the value of A by Z_(A)

2) Coding is performed by Z_(C) that has been obtained by narrowing downthe range of C to about ½ (using A)

3) Coding is performed by Z_(B) that has been obtained by narrowing downthe range of B to about ½ (using A and C)

4) Coding is performed by Z_(D) that has been obtained by narrowing downthe range of D to about 1/10 (using A, B, and C)

5) Coding is performed by Z_(I) that has been obtained by narrowing downthe range of I to about ½ (using A)

6) Coding is performed by Z_(E) that has been obtained by narrowing downthe range of E about ½ (using A and I)

7) Coding is performed by Z_(M) that has been obtained by narrowing downthe range of M to about 1/10 (using A, E, and I)

8) Coding is performed by Z_(K) that has been obtained by narrowing downthe range of K to about ¼ (using A, C, and I),

the eight coefficients given below from X are transmitted without waste.

A B C D

E ▪ ▪ ▪

I ▪ K ▪

M ▪ ▪ ▪

In this way, Z_(x) with its narrowed down range corresponds to the“information excluding the values that the coefficients cannot take” ofthe third aspect of the present invention.

With respect to the remaining eight coefficients:

▪ ▪ ▪ ▪

▪ F G H

▪ J ▪ L

▪ N O P

these are expressed as a single number index and the index istransmitted, similar to Embodiment 1.

When these are summarized, the procedure shown in algorithm 3 isobtained.

[Algorithm 3] 1. Encode A, C, B, D, I, E, M, and K in this order. 2.index←0 3. cases←0 4. for G←G′_(min) to G_(max) step 2 5. for F←F′_(min)to F_(max) step 2 6. for H←H′_(min) to H_(max) step 10 7. for J←J′_(min)to J_(max) step 4 8. for L←L′_(min) to L_(max) step 20 9. for N←N′_(min)to N_(max) step 10 10. for O←O′_(min) to O_(max) step 20 11. forP←P′_(min) to P_(max) step 100 12.  begin 13.  R←T⁻¹X(T^(t))⁻¹ (*Equation (8) *) 14.  if all elements of R are integers 15.   then (* Ato P are valid results of orthogonal transformation   of integer signals*) 16.    U←R+Y (* Equation (9) *) 17.    if all elements of U lie inthe range of 8-bit integers [0-255] 18.     then (* A to P are validresults of orthogonal transformation     of residual signals*) 19.     if X matches the original transform coefficient 20.       thenindex ←cases 21.      endif 22.      cases ←cases + 1 23.    endif 24. endif 25.  end 26. index coded using an information amountcorresponding to the cases

By the procedure above, the 16-nested loops are reduced to 8-nestedloops and the processing is speeded up.

The information amount required to describe the index is:log₂ cases[bit]  (22)

This information can be possessed by the decoding side withoutadditional information, and is information necessary for decoding theindex.

Embodiment 4 Corresponding Decoding

The present Embodiment corresponds to the seventh aspect of the presentinvention.

Here, the embodiment of decoding corresponding to the coding of theEmbodiment 3 is described. Even on the decoding side, by executing loopssimilar to those for coding, the values A to K and G to P becomeorthogonal transform coefficients corresponding to the original residualsignals when the result of validity judgment of the innermost loop for(index+1) time becomes true.

When coding of index is performed according to the amount of informationof index, firstly, the amount of information of index should be knownfor decoding this index. Thus, cases should be obtained beforehand. Forthis purpose, loops should be executed similar to the procedure forcoding.

For instance, although additional memory is necessary, multiple loopscan be executed only once as in algorithm 4 to prevent execution ofmultiple loops twice, and cases, index, original signals can be acquiredin this order. Here, Ubuf [ ] is an array of elements of a 4×4 matrix,which is acquired dynamically or acquired in adequate quantitybeforehand.

[Algorithm 4] 1. Decode A, C, B, D, I, E, M, and K in this order. 2.cases←0 3. for G←G′_(min) to G_(max) step 2 4. for F←F′_(min) to F_(max)step 2 5. for H←H′_(min) to H_(max) step 10 6. for J←J′_(min) to J_(max)step 4 7. for L←L′_(min) to L_(max) step 20 8. for N←N′_(min) to N_(max)step 10 9. for O←O′_(min) to O_(max) step 20 10. for P←P′_(min) toP_(max) step 100 11.  begin 12.  R←T⁻¹X(T^(t))⁻¹(* Equation (8) *) 13. if all elements of R are integers 14.   then (* A to P are validresults of orthogonal transformation of   integer signals *) 15.   U←R+Y (* Equation (9) *) 16.    if all elements of U lie in the rangeof 8-bit integers [0-255] 17.     then (* A to P are valid results oforthogonal transformation       of residual signals *) 18.      Ubuf[cases]←U 19.      cases ←cases + 1 20.   endif 21.  endif 22.  end 23.index decoded using the information amount corresponding to the cases24. U←Ubuf [index] (* original signal values *)

Embodiment 5 High Speed Coding Amount Estimation

The present Embodiment corresponds to the sixth aspect of the presentinvention.

In the H.264 scheme, various prediction modes can be selected, such asmultiple modes or types for intra-frame predictions, and multiple blocksizes for inter-frame predictions. Since the prediction residual signalR changes depending on the prediction mode, the coding amount per modeshould be correctly estimated for selecting the optimum prediction modeconsidering encoding amount versus distortion.

The distortion is always zero for lossless coding, thus precautions needbe taken only to minimize the coding amount (sum of the coding amountcomplying with H.264 and coding amount of additional information).

When multiple loops are executed as shown in Algorithm 1, Algorithm 2,and Algorithm 3, naturally the correct coding amount of additionalinformation can be estimated, but if a method of estimating codingamount faster exists, then it becomes convenient to compare multiplemodes.

Embodiment 5 aims to estimate the coding amount of additionalinformation without executing multiple loops.

Firstly, the case when specific transform coefficients are nottransmitted beforehand as in Embodiment 1 and Embodiment 2, is describedhere. The upper and lower limits (Equations (13) and (14)) that thecoefficients before quantization can take, are found beforehand. Basedon these limits, the volume V of the “existential space of transformcoefficients” of the sixth aspect of the present invention is determinedas follows:

$\begin{matrix}{V = {\prod\limits_{{x \in \; A},\ldots\mspace{14mu},P}^{\;}\;\left( {x_{\max} - x_{\min} + 1} \right)}} & (23)\end{matrix}$

This V is considered to approximate to the number of grid points in theexistential space. All the elements in it do not correspond to theoriginal residual signals. Since the space is expanded as shown inequation (6), the following V₀, which is equivalent to V divided by thisexpansion factor, is considered to approximate to the total number ofgrid points.V ₀ =V/40⁴⁺⁴  (24)

Accordingly, the additional information coding amount per pixel 1₀becomes:

$\quad\begin{matrix}\begin{matrix}{l_{0} = {\log_{2}{V_{0}/16}}} \\{= {{\log_{2}\left( {V/40^{4 + 4}} \right)}/16}} \\{= {{\log_{2}{V\;/16}} - {2.66\lbrack{bit}\rbrack}}}\end{matrix} & (25)\end{matrix}$

If specific transform coefficients are transmitted beforehand as inEmbodiment 3, the information amount 1₁ can be expressed similar toEquation (21) as below.

$\begin{matrix}{l_{1} = {\sum\limits_{{x \in A},\ldots\mspace{14mu},K}\;\left( {{\left( {x_{\max} - x_{\min}^{\prime}} \right)/n_{x}} + 1} \right)}} & (26)\end{matrix}$

Where x comprises the following coefficients.

A B C D

E ▪ ▪ ▪

I ▪ K ▪

M ▪ ▪ ▪ ▪

Here, n_(x) is the amount that narrows down the range mentioned earlier,and the values of A, . . . , M, are as follows:

1 2 2 10

2 ▪ ▪ ▪

2 ▪ 4 ▪

10 ▪ ▪ ▪

A′_(min)=A_(min), C′_(min) to M′_(min) are determined as shown inequation (18).

The volume V₁ of the “existential space of transform coefficients” ofthe remaining eight dimensions becomes as follows:

$\begin{matrix}{V_{1} = {\prod\limits_{{x \in \; F},\ldots\mspace{14mu},P}^{\;}\;\left( {x_{\max} - x_{\min} + 1} \right)}} & (27)\end{matrix}$

Here, similar to the previous case, the grid points corresponding to theoriginal residual signals exist sparsely. The expansion factor of thisspace is obtained by dividing equation (6) by the product of all then_(x) (xεA, . . . , M) as below.

$\quad\begin{matrix}\begin{matrix}{{n_{0} = {40^{4 + 4}/\prod\limits_{{x \in A},\ldots\mspace{14mu},M}}}\;} \\{n_{x} = {40^{8}/\left( {1*2*2*10*2*2*4*10} \right)}} \\{= {1\text{,}024\text{,}000\text{,}000}}\end{matrix} & (28)\end{matrix}$

The information amount 1₁ per pixel of the “total number of grid points”becomes

$\quad\begin{matrix}\begin{matrix}{l_{2} = {{\log_{2}\left( {V_{1}/n_{0}} \right)}/16}} \\{= {{\log_{2}{V_{1}/16}} - {1.87\;\lbrack{bit}\rbrack}}}\end{matrix} & (29)\end{matrix}$

Finally, the additional information amount per pixel becomes the sum ofthe two:1₁+1₂[bit]  (30)

Using the estimated values as in equations (25) and (30), the codingamount can be estimated without executing the coding using multipleloops. By selecting the mode at which the coding amount becomes minimumbased on this estimated coding amount, and by actually coding only forthe selected mode, near-optimal lossless coding can be realized.

Embodiment 6 Speeding Up the Validity Judgment

The present Embodiment corresponds to the fourth aspect of the presentinvention.

Because T⁻¹ is given as below, if equation (8) is calculated,floating-point calculations are necessary.

$\begin{matrix}{T^{- 1} = \begin{bmatrix}0.25 & 0.2 & 0.25 & 0.1 \\0.25 & 0.1 & {- 0.25} & {- 0.2} \\0.25 & {- 0.1} & {- 0.25} & 0.2 \\0.25 & {- 0.2} & 0.25 & {- 0.1}\end{bmatrix}} & (31)\end{matrix}$

However, if T⁻¹ is multiplied by a factor of 20, we get:

$\begin{matrix}{T_{0} = {{20T^{- 1}} = \begin{bmatrix}5 & 4 & 5 & 2 \\5 & 2 & {- 5} & {- 4} \\5 & {- 2} & {- 5} & 4 \\5 & {- 4} & 5 & {- 2}\end{bmatrix}}} & (32)\end{matrix}$

Thus, by using T₀ instead of T⁻¹, the value of 400 (=20*20) times thecorrect R shown below (hereinafter referred to as R₄₀₀) can be obtainedonly by integer operations.R ₄₀₀=400R=T ₀ XT ₀ ^(t)  (33)

When defining the following equation, equation (33) can be resolved intothe application of equation (34) eight times vertically andhorizontally. Specifically, this calculation can be performed quickly byexecuting algorithm 5.

$\begin{matrix}{\begin{bmatrix}s \\t \\u \\v\end{bmatrix} = {T_{0}\begin{bmatrix}a \\b \\c \\d\end{bmatrix}}} & (34)\end{matrix}$

[Algorithm 5] 1. x₀ ←5 (a + c) 2. x₁ ←5 (a − c) 3. x₂ ←4b + 2c 4. x₃ ←2b− 4c 5. s←x₀ + x₂ 6. t←x₁ + x₃ 7. u←x₁ − x₃ 8. v←x₀ − x₂

Here, 5x can be obtained by shifting once and adding once as in(x<<2)+x, and 4b+2c can also be obtained by shifting twice and addingonce as (b<<2)+(c<<1). Thus, no multiplication is necessary in thecalculation of equation (33).

Here, “all elements of R are integers,” which is one of the “validityjudgments” mentioned earlier, is equivalent to “all elements of R₄₀₀ aremultiples of 400.” If this is implemented, division is necessary toconfirm that the remainder after division by 400 is zero. However, sincethe redundancy that the elements are multiples of 25 has already beenremoved when making the loops, it needs only to be confirmed that theyare multiples of 16. This is equivalent to saying that the “lower 4 bitsof all elements of R₄₀₀ are all 0.” This is also equivalent to sayingthat “the result of the bit AND operation with each element and 15 (1111in binary form) is 0,” and a judgment can be made without division.

Now, it is necessary to correct the judgment that “all elements of U liewithin the range of 8-bit integers [0 to 255]” as part of another“validity judgement.” If equation (9) is multiplied on both sides by400, we get:U ₄₀₀=400U=R ₄₀₀ +Y ₄₀₀  (35)

Here, Y₄₀₀ is the prediction signal Y multiplied by 400. If Y₄₀₀ isprepared beforehand (if a 256-element lookup table is used,multiplication by 400 is not necessary), and if its sum with R₄₀₀ isdetermined, then 400 times the original signal can be obtained. Since255*400=102,000, it is sufficient to confirm that “all elements of U₄₀₀lie in the range [0 to 102,000].”

This procedure can be summarized to arrive at a procedure similar toalgorithm 6.

[Algorithm 6] 1. index←0 2. cases←0 3. for A←A_(min) to A_(max) (* 1interval only here *) 4. for C←C′_(min) to C_(max) step 2 5. forB←B′_(min)to B_(max) step 2 6. for D←D′_(min) to D_(max) step 10 7. forI←I′_(min) to I_(max) step 2 8. for E←E′_(min) to E_(max) step 2 9. forM←M′_(min) to M_(max) step 10 10. for K←K ′_(min) to K_(max) step 4 11.for G←G′_(min) to G_(max) step 2 12. for F←F′_(min) to F_(max) step 213. for H←H′_(min) to H_(max) step 10 14. for J←J′_(min) to J_(max) step4 15. for L←L′_(min) to L_(max) step 20 16. for N←N′_(min) to N_(max)step 10 17. for O←O′_(min) to O_(max) step 20 18. for P←P′_(min) toP_(max) step 100 19.  begin 20.  R₄₀₀←T₀ XT₀ ^(t) (* Equation (33) *)21.  if the lower 4 bits of all elements of R₄₀₀ are 0 22.   then (* A-Pare valid results of orthogonal transformation of   integer signals *)23.    U₄₀₀←R₄₀₀ + Y₄₀₀ (* Equation (35) *) 24.    if all elements ofU400 lie in the range of [0 to 102,000] 25.     then (* A-P are validresults of orthogonal transformation of     residual signals *) 26.     if X matches the original transform coefficient 27.       thenindex ←cases 28.      endif 29.      cases ←cases + 1 30.     endif 31. endif 32.  end 33. index coded using the information amountcorresponding to the cases

Embodiment 7 Speed-Up of Processing Using Convexity

The present Embodiment corresponds to the fifth aspect of the presentinvention.

$R = \begin{bmatrix}a & b & c & d \\e & f & g & h \\i & j & k & l \\m & n & o & p\end{bmatrix}$

Considering the existential space of the residual signal R, if theprediction pixel signal at the position of the top left element a istaken as Y_(a), then a satisfies the following existential range.0≦a+Y _(a)≦255  (36)−Y _(a) ≦a≦255−Y _(a)  (37)

The upper and lower limits are also determined in a similar manner for bto p. Considering a 16-dimensional space, the existential range Ω of Rwill be a convex polyhedron (hyper-rectangular solid).

Even in the 16-dimensional space obtained by transformation of theexistential range of R by equation (3), the existential range afterundergoing rotation and expansion is also a convex polyhedron. Althoughthe transform coefficient X exists in this transformed space, since theupper and lower limits of each element are determined as in equations(13) and (14), Ψ, the existential range of X is also a convex polyhedron(hyper-rectangular solid). Consequently, Ω∩Ψ, the intersection of Ω andΨ, also becomes a convex polyhedron. If these relationships areexpressed in two dimensions for simplification, then they will be asshown in FIG. 1.

FIG. 2 is the expanded view of the Ψ region of FIG. 1. When executingmultiple loops in the steps enumerating the grid points, if B is variedwith A=A₀ as shown in this figure, the second validity judgment (allelements of U lie within the range of 8-bit integers [0 to 255]) changesfrom “True” to “False” in the fifth grid point (grey color). Since theexistential range Ω∩Ψ is convex, “False” can be verified after the sixthgrid point, therefore, B loop is stopped and the next B loop isre-started with A=A₁. In this case, the validity judgment changes from“True” to “False” at the sixth grid point (grey color), therefore theloop is stopped. In this way, the judgment on the part surrounded by thedashed line in the figure can be suspended.

When the above is summarized, the procedure becomes similar to that inalgorithm 7. If the procedure for suspending the validity judgment ofall coefficients is shown, the indentation becomes too deep, thereforefor simplification, the procedure for suspending the validity judgmentrelated to 3 variables (N, O, and P) in the innermost of the multipleloops is shown; it is adequate to show the generality here.

$\begin{matrix}\left\lbrack {{Algorithm}\mspace{14mu} 7} \right\rbrack \\\left. {1.\mspace{14mu}{index}}\leftarrow 0 \right. \\\left. {2.\mspace{14mu}{cases}}\leftarrow 0 \right. \\\left. {3.\mspace{14mu}{for}\mspace{14mu} A}\leftarrow{A_{\min}\mspace{14mu}{to}\mspace{14mu} A_{\max}} \right. \\\left. {4.\mspace{14mu}{for}\mspace{14mu} B}\leftarrow{B_{\min}\mspace{14mu}{to}\mspace{14mu} B_{\max}} \right. \\\left. {5.\mspace{14mu}{for}\mspace{14mu} C}\leftarrow{C_{\min}\mspace{14mu}{to}\mspace{14mu} C_{\max}} \right. \\\left. {6.\mspace{14mu}{for}\mspace{14mu} D}\leftarrow{D_{\min}\mspace{14mu}{to}\mspace{14mu} D_{\max}} \right. \\\left. {7.\mspace{14mu}{for}\mspace{14mu} E}\leftarrow{E_{\min}\mspace{14mu}{to}\mspace{14mu} E_{\max}} \right. \\\left. {8.\mspace{14mu}{for}\mspace{14mu} F}\leftarrow{F_{\min}\mspace{14mu}{to}\mspace{14mu} F_{\max}} \right. \\\left. {9.\mspace{14mu}{for}\mspace{14mu} G}\leftarrow{G_{\min}\mspace{14mu}{to}\mspace{14mu} G_{\max}} \right. \\\left. {10.\mspace{14mu}{for}\mspace{14mu} H}\leftarrow{H_{\min}\mspace{14mu}{to}\mspace{14mu} H_{\max}} \right. \\\left. {11.\mspace{14mu}{for}\mspace{14mu} I}\leftarrow{I_{\min}\mspace{14mu}{to}\mspace{14mu} I_{\max}} \right. \\\left. {12.\mspace{14mu}{for}\mspace{14mu} J}\leftarrow{J_{\min}\mspace{14mu}{to}\mspace{14mu} J_{\max}} \right. \\\left. {13.\mspace{14mu}{for}\mspace{14mu} K}\leftarrow{K_{\min}\mspace{14mu}{to}\mspace{14mu} K_{\max}} \right. \\\left. {14.\mspace{14mu}{for}\mspace{14mu} L}\leftarrow{L_{\min}\mspace{14mu}{to}\mspace{14mu} L_{\max}} \right. \\\left. {15.\mspace{14mu}{for}\mspace{14mu} M}\leftarrow{M_{\min}\mspace{14mu}{to}\mspace{14mu} M_{\max}} \right. \\{16.\mspace{14mu}{begin}} \\\left. {17.\mspace{14mu}{CheckN}}\leftarrow{False} \right. \\\left. {18.\mspace{14mu}{for}\mspace{14mu} N}\leftarrow{N_{\min}\mspace{14mu}{to}\mspace{14mu} N_{\max}} \right. \\{19.\mspace{14mu}{begin}} \\\left. {20.\mspace{14mu}{CheckO}}\leftarrow{False} \right. \\\left. {21.\mspace{14mu}{for}\mspace{14mu} O}\leftarrow{O_{\min}\mspace{14mu}{to}\mspace{14mu} O_{\max}} \right. \\{22.\mspace{14mu}{begin}} \\\left. {23.\mspace{14mu}{CheckP}}\leftarrow{False} \right. \\\left. {24.\mspace{14mu}{for}\mspace{14mu} P}\leftarrow{P_{\min}\mspace{14mu}{to}\mspace{14mu} P_{\max}} \right. \\{25.\mspace{14mu}{begin}} \\\left. {26.\mspace{14mu} R}\leftarrow{T^{- 1}{X\left( T^{t} \right)}^{- 1}\left( {\text{*}{Equation}\mspace{14mu}(8)\text{*}} \right)} \right. \\{27.\mspace{14mu}{if}\mspace{14mu}{all}\mspace{14mu}{elements}\mspace{14mu}{of}\mspace{14mu} R\mspace{14mu}{are}\mspace{14mu}{integers}} \\{28.\mspace{14mu}{then}\mspace{14mu}\left( {{\text{*}A} - {P\mspace{14mu}{are}\mspace{14mu}{valid}\mspace{14mu}{results}\mspace{14mu}{of}\mspace{14mu}{orthogonal}\mspace{14mu}{transformation}\mspace{14mu}{of}\mspace{14mu}{integer}\mspace{14mu}{signals}\text{*}}} \right)} \\\left. {29.\mspace{14mu} U}\leftarrow{R + {Y\mspace{11mu}\left( {\text{*}{Equation}\mspace{14mu}(9)\text{*}} \right)}} \right. \\{30.\mspace{14mu}{if}\mspace{14mu}{all}\mspace{14mu}{elements}\mspace{14mu}{of}\mspace{14mu} U\mspace{14mu}{lie}\mspace{14mu}{in}\mspace{14mu}{the}\mspace{14mu}{range}\mspace{14mu}{of}\mspace{14mu} 8\text{-}{bit}\mspace{14mu}{{integers}\mspace{14mu}\left\lbrack {0\mspace{14mu}{to}\mspace{14mu} 255} \right\rbrack}} \\{31.\mspace{14mu}{then}\mspace{14mu}\left( {{\text{*}A} - {P\mspace{14mu}{are}\mspace{14mu}{valid}\mspace{14mu}{results}\mspace{14mu}{of}\mspace{14mu}{orthogonal}\mspace{14mu}{transformation}\mspace{14mu}{of}\mspace{14mu}{residual}\mspace{14mu}{signals}\text{*}}} \right)} \\{32.\mspace{14mu}{if}\mspace{14mu} X\mspace{14mu}{matches}\mspace{14mu}{the}\mspace{14mu}{original}\mspace{14mu}{transform}\mspace{14mu}{coefficient}} \\\left. {33.\mspace{20mu}{then}\mspace{14mu}{index}}\leftarrow{cases} \right. \\{34.\mspace{14mu}{endif}} \\\left. {35.\mspace{14mu}{Check}\mspace{14mu} N}\leftarrow{True} \right. \\\left. {36.\mspace{14mu}{Check}\mspace{14mu} O}\leftarrow{True} \right. \\\left. {37.\mspace{14mu}{Check}\mspace{14mu} P}\leftarrow{True} \right. \\\left. {38.\mspace{14mu}{cases}}\leftarrow{{cases} + 1} \right. \\{{39.\mspace{14mu}{else}\mspace{14mu}{if}\mspace{14mu}{CheckP}} = {True}} \\{40.\mspace{14mu}{then}\mspace{14mu}{goto}\mspace{14mu} 21\mspace{11mu}\left( {\text{*}\mspace{14mu}{the}\mspace{14mu}{validity}\mspace{14mu}{judgment}\mspace{14mu}{changes}\mspace{14mu}{from}\mspace{14mu}{True}\mspace{14mu}{to}\mspace{14mu}{False}\mspace{14mu}\text{*}} \right)} \\{41.\mspace{14mu}{endif}} \\{42.\mspace{14mu}{endif}} \\{43.\mspace{14mu}{end}} \\{{44.\mspace{14mu}{if}\mspace{14mu}{CheckP}} = {{{False}\mspace{14mu}{and}\mspace{14mu}{CheckO}} = {True}}} \\{45.\mspace{14mu}{then}\mspace{14mu}{goto}\mspace{14mu} 18\mspace{14mu}\left( {\text{*}\mspace{11mu}{the}\mspace{14mu}{validity}\mspace{14mu}{judgment}\mspace{14mu}{changes}\mspace{14mu}{from}\mspace{14mu}{True}\mspace{14mu}{to}\mspace{14mu}{False}\mspace{11mu}\text{*}} \right)} \\{46.\mspace{14mu}{endif}} \\{47.\mspace{14mu}{end}} \\{{48.\mspace{14mu}{if}\mspace{14mu}{CheckP}} = {{{False}\mspace{14mu}{and}\mspace{14mu}{CheckO}} = {{{False}\mspace{14mu}{and}\mspace{14mu}{CheckN}} = {True}}}} \\{49.\mspace{14mu}{then}\mspace{14mu}{goto}\mspace{14mu} 15\mspace{14mu}\left( {\text{*}\mspace{14mu}{True}\mspace{14mu}{changes}\mspace{14mu}{to}\mspace{14mu}{False}\;\text{*}} \right)} \\{50.\mspace{14mu}{endif}} \\{51.\mspace{14mu}{end}} \\{52.\mspace{14mu}{end}} \\{53.\mspace{14mu}{index}\mspace{14mu}{coded}\mspace{14mu}{using}\mspace{14mu}{the}\mspace{14mu}{informaiton}\mspace{14mu}{amount}\mspace{14mu}{corresponding}\mspace{14mu}{to}\mspace{14mu}{the}\mspace{14mu}{cases}}\end{matrix}$

Embodiment 8 Example of Configuration of Coding Apparatus

The present Embodiment corresponds to the eighth aspect of the presentinvention.

The configuration of apparatus for realizing the present invention isdescribed below. FIG. 3 shows an example of the configuration of aprogressive lossless video coding apparatus of the present invention. Inaddition to a section (not shown in FIG. 3) that calculates, for eachblock, the residual signal Rorig between an original image signal and apredicted image signal obtained by time prediction in inter-flame codingor space prediction in intra-frame coding based on the H.264 standardcoding scheme, the progressive lossless video coding apparatus 1 isprovided with: an initialization section 11 that initializes cases andindex; an orthogonal transformation section 12 that orthogonallytransforms the residual signal Rorig; a quantization section 13 thatquantizes the output of the orthogonal transformation section 12; anexistential space determination section 14 that determines upper andlower limit information A_(min), A_(max), . . . , P_(min), and P_(max);a successive coefficients coding section 15 that codes coefficients tobe transmitted successively in a coded format, a bundled coefficientscoding section 16 that determines and codes index, a number thatrepresents bundled coefficients; and an end judgment section 17 thatjudges whether all the blocks in the image have been coded.

The bundled coefficients coding section 16 is provided with: a multipleloop starting section 161 that enumerates combinations of allcoefficients within the upper and lower limits of each coefficient; aninverse orthogonal transformation section 162 that performs inverseorthogonal transformation of a 4×4 matrix X established by coefficientsin the existing loop and coefficients already coded and transmitted; aprediction signal adding section 163 that determines the sum of matricesU=R+Y; an internal variable updating section 164 that updates index andcases; a multiple loop end judging section 165 that judges whethercombinations of all coefficients within the upper and lower limits ofeach coefficient have been examined or not; and a serial number codingsection 166 that codes the index.

The progressive lossless video coding apparatus 1 shown in FIG. 3 worksas described below. First, the initialization section 11 initializes the“total number of grid points” cases and the “serial numbers” index ofgrid points that match the orthogonal transform coefficients of residualsignals, respectively to 0.

Next, the orthogonal transformation section 12 applies orthogonaltransformation to the residual signal Rorig to obtain Xorig. Thequantization section 13 quantizes this Xorig using the information onquantization parameters. From this quantization information, theexistential space determination section 14 determines the information onupper and lower limits A_(min), A_(max), . . . , P_(min), and P_(max).

Next, the successive coefficients coding section 15 codes thecoefficients to be transmitted successively in a coded format. Forinstance, in case of the Embodiment 1 mentioned above, no coefficientsare coded; while in case of the Embodiment 3, eight coefficients, namelyA, C, B, D, I, E, M, and K, are coded.

Next, the bundled coefficients coding section 16 determines and codesthe index which is a number that bundles and represents the remainingcoefficients. That is, the multiple loop starting section 161 in thebundled coefficients coding section 16 enumerates all the ranges thatthe remaining coefficients (for instance, 16 coefficients from A to P incase of Embodiment 1, and 8 coefficients, namely G, F, H, J, L, N, O andP in case of Embodiment 3) can take within the upper and lower limitsthereof. In this case, impossible combinations of coefficients may bebypassed using the integer value relationship between coefficients, asin Embodiment 2.

The inverse orthogonal transformation section 162 performs inverseorthogonal transformation of the 4×4 matrix X established bycoefficients A to P in the present loop and coefficients already codedand transmitted, to obtain R. If non-integer values exist in R, the flowadvances to the process of the multiple loop end judging section 165.

Next, the prediction signal adding section 163 find the sum of matricesU=R+Y. Here, if an element of U that does not lie in the range [0 to255] exists, the flow advances to the process of the multiple loop endjudging section 165.

Next, if X and Xorig match, then the internal variable updating section164 substitutes cases for index. Moreover, 1 is added to cases.

The multiple loop end judging section 165 judges whether allcombinations of coefficients within the upper and lower limits have beenexamined. If they have not been examined, the flow returns theprocessing to the multiple loop starting section 161. If the examinationhas been completed, the serial number coding section 166 codes indexusing the information amount of the cases.

Next, the end judging section 17 judges whether all blocks in the imagehave been coded. If not, the flow moves to the processing for the nextblock and the initialization section 11 restarts the processing. Ifcompleted, coding ends.

[If Universal Variable Length Code is Used for Coding the Index]

In the present invention, the universal variable length code (Reference:Y. Itoh, N-M Cheung: “Universal variable length code for DCT coding,”IEEE Proc. Int. Conf. Image Processing, Vol. 1, pp. 940-943, 2000), forinstance, may be used to code the index without using cases. In thiscase, if X and Xorig match in the internal variable updating section164, then universal variable length coding of the value of cases at thattime is performed, and the processing by the bundled coefficients codingsection 16 ends immediately.

Embodiment 9 Example of Configuration of Decoding Apparatus

The present Embodiment corresponds to the ninth aspect of the presentinvention.

FIG. 4 shows an example of the configuration of the progressive losslessvideo decoding apparatus of the present invention. The progressivelossless video decoding apparatus 2 is provided with: an initializationdecoding section 21 that decodes quantization parameters andquantization coefficients, and also generates a prediction signal Y; anexistential space determination section 22 that determines informationon upper and lower limits A_(min), A_(max), . . . , P_(min), andP_(max); a successive coefficients decoding section 23 that decodescoefficients which are successively coded and transmitted; a bundledcoefficients decoding section 24 that decodes index, a number thatbundles and represents the coefficients; Ubuf [ ] 25, an array storagethat stores values of U; and an end judging section 26 that judgeswhether all the blocks in the image have been decoded.

The bundled coefficients decoding section 24 is provided with: amultiple loop starting section 241 that enumerates combinations of allcoefficients within the upper and lower limits of each coefficient; aninverse orthogonal transformation section 242 that performs inverseorthogonal transformation of a 4×4 matrix X established by coefficientsin the existing loop and coefficients already decoded; a predictionsignal adding section 243 that determines the sum of matrices U=R+Y; aninternal variable updating section 244 that stores U in the address ofUbuf [ ]25 designated by the cases and updates cases; a multiple loopend judging section 245 that judges whether combinations of allcoefficients have been examined within the upper and lower limits ofeach coefficient; a serial number decoding section 246 that decodesindex; and an original signal output section 247 that outputs the valueof an element of Ubuf [ ]25 specified by index as the original imagesignal.

The progressive lossless video decoding apparatus 2 shown in FIG. 4works as described below. First, the initialization decoding section 21initializes cases, the total number of grid points to 0, decodes thequantization parameters and quantization coefficients, and generates theprediction signal Y.

Based on the quantization parameters and the quantization coefficients,the existential space determination section 22 finds the information onupper and lower limits A_(min), A_(max), . . . , P_(min), and P_(max).

Next, the successive coefficients decoding section 23 decodes thecoefficients that have been successively coded and transmitted. Forinstance, in case of the Embodiment 1, no coefficients are decoded;while in case of the Embodiment 3, eight coefficients, namely A, C, B,D, I, E, M, and K are decoded in this order.

Next, the bundled coefficients decoding section 24 decodes the index,which is a number that bundles and represents the remainingcoefficients, and performs lossless restoration. That is, the multipleloop starting section 241 in the bundled coefficients decoding section24 enumerates all the ranges that the remaining coefficients (forinstance, 16 coefficients from A to P in case of Embodiment 1, and 8coefficients, namely G, F, H, J, L, N, O, and P in case of Embodiment 3)can take within the upper and lower limits thereof.

In this case, impossible combinations of coefficients may be bypassedusing the integer value relationship between coefficients, as inEmbodiment 2. However, the procedure for bypassing impossiblecombinations of coefficients and enumerating is exactly the same as theprocedure for the corresponding coding apparatus.

The inverse orthogonal transformation section 242 performs inversetransformation of the 4×4 matrix X established by the coefficients A toP in the existing loop and the coefficients decoded already, to obtainR. If non-integer values exist in R, the flow advances to the process ofthe multiple loop end judging section 245.

Next, the prediction signal adding section 243 find the sum of matricesU=R+Y. Here, if the value of an element of U that does not lie in therange [0 to 255] exists, the flow advances to the process of themultiple loop end judging section 245.

Next, the internal variable updating section 244 stores U in the addressof Ubuf [ ] 25 specified by cases ensured beforehand and adds 1 tocases.

The multiple loop end judging section 245 judges whether allcombinations of coefficients within the upper and lower limits have beenexamined. If they have not been examined yet, the flow returns theprocessing to the multiple loop starting section 241. If the examinationhas been completed, the serial number decoding section 246 decodes theindex using the information amount corresponding to the cases.

Next, the original signal output section 247 extracts the value of theUbuf [ ] 25 specified by index, and outputs it as the original imagesignal.

Next, the end judging section 26 judges whether all blocks in the imagehave been decoded. If not, the flow moves to the process for the nextblock and the initialization decoding section 21 restarts theprocessing. If they have been decoded, the decoding ends.

[Example of Configuration of Decoding Apparatus when Universal VariableLength Code is Used in the Coding of the Index]

When universal variable length code is used for coding the index in thepresent invention, the configuration of functional blocks becomessimilar to that shown in FIG. 5 on the decoding side. In the progressivelossless video decoding apparatus 3 shown in FIG. 5, the universalvariable length decoding section 27 decodes the index, the multiple loopend judging section 285 judges whether the number of times multipleloops have been executed is the same as the index, and if it is, judgesend of the processing immediately, and outputs the value of U at thatstage as the original signal. Consequently, the array storage such asUbuf [ ] 25 shown in FIG. 4 is not necessary. The operation of otherparts is the same as in the example described in FIG. 4.

Example 1

Example 1 corresponding to Embodiment 3 is described here. An overviewof the core processing in Example 1 is described below.

Input: Quantization parameter, prediction signal Y, and originalresidual signal Rorig

Process: A part of the orthogonal transform coefficients correspondingto the original signals is converted to compressed information, and therest of the coefficients are expressed as serial numbers among thosethat enumerate all combinations that can become original signals withoutomission.

Output: Compressed information (Z_(A) to Z_(K)) that expresses a part ofthe coefficients (A, C, B, D, I, E, M, and K), and code (index) thatrepresents one number summarizing the remaining coefficients (G, F, H,J, L, N, O, and P)

Example 1 is described here referring to the process flow shown in FIG.6. Firstly, the quantization parameter, the prediction signal Y, and theoriginal residual signal Rorig are input in step S101. Next, both indexand cases are initialized to 0 in step S102.

Next, orthogonal transformation is applied to Rorig in step S103 toobtain original transform coefficient Xorig. At the same time, thequantization coefficient obtained by quantizing Xorig is alsodetermined. In step S104, the upper and lower limits of each element (Ato P) of X, which is an estimated matrix of Xorig that has beendetermined from the quantization parameters and quantizationcoefficients obtained until now. Based on these, A, C, B, D, I, E, M,and K are subjected to compressive coding sequentially in step S105.

Next, the flow advances the 8-nested loop for G, F, H, J, L, N, O, and P(step S106 to step S114). In step S107, R is obtained by inversetransformation of the 4×4 matrix X formed by the present values of A toP using equation (8).

In step S108, it is confirmed that all the elements of R are integers.If false, the flow moves to step S114; if true, the flow moves to stepS109 to calculate U=R+Y.

Next, in step S110, all elements of U are checked to confirm whetherthey lie within the range of [0-255]. If false, the flow moves to stepS114; if true, the flow moves to step S110, to confirm whether X isequal to the original transform coefficient Xorig. If this is true, thevalue of the present cases is stored in the variable index in step S112.1 is added to the value of cases in step S113 and the flow moves to stepS114.

A check is made in step 114 to confirm that all the 8-nested loops havebeen completed. If false, the flow returns to step S106, which is thebeginning of the loop. If true, in step S115, the index is coded usingthe information amount (equation (22)) of the cases (total number ofgrid points) already found, and the processing ends.

Here, an example of the process of separately coding (step S105) firstlya part of the coefficients (eight coefficients A, C, B, D, I, E, M, andK) beforehand was shown. However, if this is omitted, and if step S106to step S114 are made multiple loops of all 16 coefficients, an examplecorresponding to Embodiment 1 or Embodiment 2 with exactly the sameframework can be obtained.

Example 2

Example 2 corresponding to Embodiment 4 is described here. An overviewof the core processing in Example 2 is described below.

Input: Quantization parameter, prediction signal Y, and quantizationcoefficient

Process: A part of the orthogonal transform coefficients (A, C, B, D, I,E, M, and K) corresponding to the original signals is decoded from thecompressed information, and the rest of the coefficients (G, F, H, J, L,N, O, and P) are decoded as serial numbers that designate combinationsin all enumerated combinations which can become original signals withoutomission.

Output: Original image signal

Example 2 is described here referring to the process flow shown in FIG.7. Firstly, cases is initialized to 0 in step S201. Next, quantizationparameters and quantization coefficients are decoded, and the predictionsignal Y is generated in step S202. This information can be obtainedfrom the H.264 basic information bit stream.

In step S203, the upper and lower limits of each coefficient (A to P) ofthe matrix X are found from the information obtained until now. Based onthese limits, A, C, B, D, I, E, M, and K are decoded sequentially instep S204.

Next, the flow advances the 8-nested loop of G, F, H, J, L, N, O, and P(step S205 to step S212). In step S206, R is obtained by inversetransformation of the 4×4 matrix X formed by the present values of A toP using equation (8).

In step S207, all the elements of R are checked if they are integers. Iffalse, the flow moves to step S212; if true, the flow moves to step S208to calculate U=R+Y.

Next, in step S209, all elements of U are checked to confirm if they liewithin the range of [0-255]. If this is true, the present value of U isstored in the address of the array Ubuf [ ] specified by cases in stepS210, the flow moves to step S211 where 1 is added to the cases and thenmoves to step S212. If false, the flow moves to step S212.

In step 212, a check is made to confirm that all the 8-nested loops havebeen completed. If false, the process returns to step S205, which is thebeginning of the loop. If true, in step S213, the index is decoded usingthe information amount (equation (22)) of the cases (total number ofgrid points) already found, and Ubuf [index] (corresponding to theoriginal signal) is output in step S214, and the process ends.

In the Examples above, the example of coding index using cases wasdescribed, but for coding the index, universal variable length code(UVLC: Universal Variable Length Code) or stop code may also be used.When universal variable length code or stop code is used for codingindex, decoding is possible even if cases on the decoding side is notknown. In this case, the coding amount for index may have to beincreased by slightly less than 20%. However, since there is no need tocalculate the value of cases, the process can be suspended halfwaythrough the multiple loops. This has the advantage that the time forboth coding and decoding can be reduced to about half. Another advantageis that the array storage Ubuf [ ] on the decoding side is notnecessary.

Embodiments and Examples of the present invention have been describedabove referring to the drawings, but these are meant only forillustrating the present invention, which is evidently not limited toonly these Embodiments and Examples. Consequently, various changes suchas additions, omissions, substitutions, and so on of structural elementsmay be effected to the present invention without departing from thespirit and scope of the present invention.

For instance, in addition to the mode for realizing the apparatusesshown in FIGS. 3 to 5 by dedicated hardware, the apparatuses may includea computer system provided with memory, central processing unit (CPU)and so on, with a program for realizing processing of these apparatuses(for instance, each step given in FIGS. 6 to 7) loaded in memory andexecuted, so that the functions of the apparatuses are realized.Moreover, the program for realizing the functions mentioned above may berecorded in recording media that can be read by a computer, and theprogram recorded in the recording media may be read by the computersystem and run by the computer.

The computer system mentioned here is assumed to include an OS andhardware such as peripheral equipment. The recording media that can beread by a computer refers to portable media such as flexible disks,magneto-optical disks, ROM, CD-ROM and so on, and recording equipmentsuch as hard disks integrated within the computer system. Theabove-mentioned program may be meant for realizing a part of thefunctions mentioned above, or it may be a difference file (differenceprogram) that can realize the functions by combining with the programsrecorded already in the computer system.

Furthermore, progressive lossless video coding apparatus and progressivelossless video decoding apparatus may be configured as described below.

That is, the progressive lossless video coding apparatus may be providedwith: a means for generating bit streams compliant with the H.264standard; a means for inputting a prediction signal by space predictionin intra-frame coding or by time prediction in inter-frame coding in thecoding of each block of an image signal; a means for inputting aresidual signal obtained by subtracting the prediction signal from theoriginal signal; a means for determining transform coefficients obtainedby applying orthogonal transformation on the residual signal based onthe H.264 standard scheme and quantization coefficients that havequantized the transform coefficients; a means for identifying theexistential space of transform coefficients established fromquantization coefficients, quantization parameters and quantizationmethods; a validity judging means for judging whether the grid points inthe space are valid as the results of orthogonal transformation of theresidual signal; an enumerating means for enumerating grid points forwhich the judgments mentioned above are valid from the grid points inthe space; a means for sequentially assigning serial numbers startingfrom 0 to the enumerated grid points; a means for obtaining serialnumbers of grid points that match the transform coefficients of theresidual signals from the enumerated grid points; and a means for codingthe obtained serial numbers.

When enumerating grid points in the progressive lossless video codingapparatus mentioned above, a means may be provided for omitting thevalidity judging process for points at which transform coefficientscannot take in the space, by using integer value relationship betweentransform coefficients.

The above-mentioned progressive lossless video coding apparatus may alsoinclude: a means for transmitting information excluding values for whichsome specific transform coefficients cannot take by using integer valuerelationship between the specific transform coefficients and alreadytransmitted coefficients (if they exist), instead of transmitting thespecific transform coefficients; and a means for enumerating grid pointsin existential space, the dimension of which is reduced, using transformcoefficients transmitted beforehand.

The progressive lossless video coding apparatus mentioned above, mayalso include a means for equivalently realizing the validity judgmentmentioned above only with bit operation, integer addition, and integersubtraction.

The progressive lossless video coding apparatus mentioned above mayinclude a means for suspending the above-mentioned validity judgmenthalfway by using the knowledge that the intersection of existentialrange of residual signals and existential range of transformcoefficients forms a convex polyhedron.

The progressive lossless video coding apparatus mentioned above mayinclude a means for estimating the coding amount without enumerating thegrid points by the above-mentioned enumerating means.

The progressive lossless video decoding apparatus corresponding to theprogressive lossless video coding apparatus mentioned above, includes: ameans for implementing the H.264 standard decoding scheme; a means foridentifying the existential space of transform coefficients establishedfrom quantization parameters, quantization coefficients, quantizationmethods on the coding side and from already-reproduced coefficients (ifthey exist); a means for decoding coefficients to be decoded; anenumerating means and a validity judging means similar to the firstthrough third aspects of the present invention; a means for decodingserial numbers; and a means for outputting grid points, the order ofwhich is equal to a serial number.

INDUSTRIAL APPLICABILITY

The present invention is related to progressive lossless video codingand decoding technology that realizes highly efficient video coding anddecoding. According to the present invention, while maintainingcompatibility with the coding in the H.264 standard for codestransmitted as base part, lossless decoding matching the originalsignals can be performed while restricting the coding amount of theadditional part to a minimum. Moreover, according to the presentinvention, processing can be speeded up by several trillions of times.Furthermore, according to the present invention, the coding amount canbe estimated without actually performing the coding, and as a result,the prediction mode for reducing the coding amount can be selected athigh speed.

1. A progressive lossless video coding method that performs video codingwhich allows decoding that matches an original signal comprising: a stepthat inputs a residual signal obtained by subtracting a predictionsignal from an original signal for each block of an image signal, theprediction signal conforming to a predetermined lossy video codingscheme and being obtained by space prediction in intra-frame coding orby time prediction in inter-frame coding; a step that determinestransform coefficients obtained by applying orthogonal transformation onthe residual signal and quantization coefficients obtained by quantizingthe transform coefficients based on the lossy video coding scheme; astep that identifies existential space of transformed coefficientsestablished from the quantization coefficients, and quantizationparameters and quantization methods used during quantization; a validityjudging step that judges whether grid points in the existential space ofthe transform coefficients are valid as a result of orthogonaltransformation of the residual signal; an enumerating step thatsearches, in a predetermined grid point order, grid points for which thejudgment is valid from the grid points in the existential space of thetransform coefficients, and enumerates the grid points thus searched; astep that assigns serial numbers in the order of enumeration toenumerated grid points; a step that acquires serial numbers of gridpoints matching the transform coefficients of the residual signal fromthe enumerated grid points, and a step that codes and outputs the serialnumbers of the grid points matching the transform coefficients of theresidual signal.
 2. The progressive lossless video coding method as setforth in claim 1, wherein, in the enumerating step that enumerates thegrid points for which the judgment is valid from the grid points in theexistential space of the transform coefficients, processing of judgmenton whether the grid points are valid as the result of the orthogonaltransformation of the residual signal is omitted for grid points atwhich transform coefficients cannot take in the space by using aninteger value relationship between the transform coefficients.
 3. Theprogressive lossless video coding method as set forth in claim 1,further comprising a step that outputs information excluding values forwhich some specific transform coefficients cannot take by using aninteger value relationship between the specific transform coefficientsand coefficients which have been already output, instead of outputtingthe specific transform coefficients, wherein, in the enumerating stepthat enumerates grid points for which the judgment is valid from thegrid points in the existential space of the transform coefficients, thegrid points are enumerated in existential space having a reduceddimension using the transform coefficients output beforehand.
 4. Theprogressive lossless video coding method as set forth in claim 1,wherein the validity judging step judges validity using only bitoperations, integer addition, and integer subtraction.
 5. Theprogressive lossless video coding method as set forth in claim 1,wherein, by using the knowledge that an intersection between anexistential range of the residual signal and an existential range of thetransform coefficients becomes a convex polyhedron, the validityjudgment is suspended halfway when the grid points to be judged existoutside the convex polyhedron.
 6. The progressive lossless video codingmethod as set forth in claim 1, further comprising a step that estimatesa coding amount without executing the enumerating step that enumeratesthe grid points for which the judgment is valid from the grid points inthe existential space of the transform coefficients.
 7. A decodingmethod for decoding coded streams coded by the progressive losslessvideo coding method as set forth in any of claim 1 to claim 6,comprising: a step that executes a decoding scheme corresponding to thepredetermined lossy video coding scheme; a step that identifiesexistential space of transform coefficients established fromquantization parameters, quantization coefficients, quantization methodson a coding side, and, if any, already decoded coefficients; a step thatdecodes coefficients that need to be decoded; a validity judging stepthat judges whether a grid point in the existential space of thetransform coefficients is valid as a result of orthogonal transformationof the residual signal; an enumerating step that searches grid pointsfrom the grid points in the existential space of the transformcoefficients for which the judgment is valid in the same order as theorder of search of the grid points during coding; a step that decodesserial numbers; and a step that outputs grid points having orders thatare equal to the decoded serial numbers from enumerated grid points. 8.A lossless video coding apparatus that performs video coding whichallows decoding that matches an original signal, comprising: a meansthat inputs a residual signal obtained by subtracting a predictionsignal from an original signal for each block of an image signal, theprediction signal conforming to a predetermined lossy video codingscheme and being obtained by space prediction in intra-frame coding orby time prediction in inter-frame coding; a means that determinestransform coefficients obtained by applying orthogonal transformation onthe residual signal and quantization coefficients obtained by quantizingthe transform coefficients based on the lossy video coding scheme; anexistential space deciding means that identifies existential space oftransformed coefficients established from the quantization coefficients,and quantization parameters and quantization methods used duringquantization; a validity judging means that judges whether grid pointsin the existential space of the transform coefficients are valid as aresult of the orthogonal transformation of the residual signal; anenumerating means that searches, in a predetermined grid point order,grid points for which the judgment is valid from the grid points in theexistential space of the transform coefficients, and enumerates the gridpoints thus searched; a means that assigns serial numbers in the orderof enumeration to enumerated grid points; a means that acquires serialnumbers of grid points matching the transform coefficients of theresidual signal from enumerated grid points, and a means that codes andoutputs the serial numbers of the grid points matching the transformcoefficients of the residual signal.
 9. A lossless video decodingapparatus that decodes coded streams coded by the progressive losslessvideo coding apparatus as set forth in claim 8, comprising: a means thatexecutes a decoding scheme corresponding to the predetermined lossyvideo coding scheme; an existential space determining means thatidentifies existential space of transform coefficients established fromquantization parameters, quantization coefficients, quantization methodson a coding side, and, if any, already decoded coefficients; acoefficient decoding means that decodes coefficients that need to bedecoded; a validity judging means that judges whether a grid point inthe existential space of the transform coefficients is valid as a resultof orthogonal transformation of the residual signal; an enumeratingmeans that searches grid points from the grid points in the existentialspace of the transform coefficients for which the judgment is valid inthe same order as the order of search of grid points during coding; aserial number decoding means that decodes serial numbers; and an outputmeans that outputs grid points having orders that are equal to thedecoded serial numbers from enumerated grid points.
 10. A non-transitorycomputer-readable recording medium for progressive lossless video codingprogram wherein a program for executing on a computer the progressivelossless video coding method as set forth in any of claim 1 to claim 6is recorded on a recording medium that can be read by the computer. 11.A non-transitory computer-readable recording medium for progressivelossless video decoding program wherein a program for executing on acomputer the progressive lossless video decoding method as set forth inclaim 7 is recorded on a recording medium that can read by the computer.